import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store/store";
import filters from "@/utils/filter";
import directives from "@/utils/directives";

// method1 to zh-cn
// import zh from 'vee-validate/dist/locale/zh_CN'

// method2 to zh-cn
import "@/utils/veevalidate";
import Alert from "@/components/modules/alert/index";
import Pop from "@/components/modules/pop/index";

Vue.use(Alert);
Vue.use(Pop);
Object.keys(filters).forEach((key) => {
  Vue.filter(key, filters[key]);
});
Object.keys(directives).forEach((key) => {
  Vue.directive(key, directives[key]);
});
// Vue.filter('moment',formatDate)
// method1 to zh-cn
// Validator.localize('zh-CN', zh)

// method2 to zh-cn
// const validator = new Validator()
// validator.localize('zh-CN')

Vue.config.productionTip = false;

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
